﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="GisShow.ascx.cs" Inherits="UserControl_GisShow" %>
<div class="mapframe">
<a href="#" id="btnShowDialog">纠正标注</a>
<a href="#" id="btnzoomOutMapDialog">放大地图</a>
<asp:Panel ID="mapPanel" Style="border: 1px solid silver;" runat="server">
</asp:Panel>
</div>
<script type="text/javascript">

    $(document).ready(function () {
        var centerPoint = new google.maps.LatLng(<%=CenterPoint.Y %>, <%=CenterPoint.X %>);
        var mapCanvas = $('#<%=mapPanel.ClientID %>');
        var gisShow_Map = local.gmap.createMap(mapCanvas,centerPoint);
        local.gmap.autoLocatePosition(gisShow_Map,true);

        <% 
            if (this.MarkerPoints.Count() > 0)
            {
                for (int i = 0; i < this.MarkerPoints.Count; i++)
                {
                    Response.Write("local.gmap.addMarker(gisShow_Map,new google.maps.LatLng(" 
                    + MarkerPoints[i].Point.Y + "," + MarkerPoints[i].Point.X 
                    + "),'"+ MarkerPoints[i].TipsContent + "','" + MarkerPoints[i].ClickInfoContent + "');\r\n ");
                }
            }
        %>
     
        local.gmap.fitMarkerBounds(gisShow_Map);

        $("#btnShowDialog").bind("click",function(){
            local.gmap.showPopupMapChooser(centerPoint);
        });
        $("#btnzoomOutMapDialog").bind("click",function(){
            local.gmap.popUpzoomOutMap(centerPoint);
        });
    });
 
</script>


